package com.stars.home.vmodel


import android.app.Application
import android.view.inputmethod.EditorInfo
import androidx.databinding.Bindable
import com.stars.home.BR
import com.trailer.base.base.BRRepository
import com.trailer.base.base.BRViewModel

open abstract class SearchVModel(application: Application) : BRViewModel<BRRepository>(application) {
    @Bindable
    var k: String = ""
        set(value) {
            field = value
            notifyPropertyChanged(BR.k)
        }

    fun onAction(actionId: Int): Boolean {
        if (actionId == EditorInfo.IME_ACTION_SEARCH) {
            firstReq()
        }
        return false
    }

}
